package first.chapter2.profile;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @Description: 类作用描述
 * @Author: ChenZhiXiang
 * @CreateDate: 2019/5/8 0008 16:51
 * @Version: 1.0
 */
@Configuration
public class ProfileConfig {

    @Bean
    @Profile("dev")
    public ProfileBean devProfileBean(){
        ProfileBean devProfileBean = new ProfileBean();
        devProfileBean.setName("陈志翔");
        return devProfileBean;
    }

    @Bean
    @Profile("prod")
    public ProfileBean prodProfileBean(){
        ProfileBean prodProfileBean = new ProfileBean();
        prodProfileBean.setName("hahah");
        return prodProfileBean;
    }
}
